package com.designMode.visitor;

public class ConcreteVisitor2 implements Visitor {
    /**
     * 访问元素1
     */
    @Override
    public void visitConcreteElement(ConcreteElement1 elem) {
        System.out.print("访问者开始访问元素1->");
        elem.doOtherThing();
    }

    /**
     * 访问元素2
     */
    @Override
    public void visitConcreteElement(ConcreteElement2 elem) {
        System.out.print("访问者开始访问元素2->");
        elem.doOtherThing();
    }
}
